home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_1 / morse < prev    next >
Internet Message Format  |  1995-03-31  |  10KB

  1. From steveh@hpcvra.CV.HP.COM Mon Apr 30 18:54:12 1990
  2. From: steveh@hpcvra.CV.HP.COM (Steve Harper)
  3. Newsgroups: comp.sys.handhelds
  4. Subject: Morse code practice for the HP48SX
  5. Date: 25 Apr 90 20:20:18 GMT
  6. Organization: Hewlett-Packard Co., Corvallis, OR, USA
  7.  
  8. I have received a request to post the morse code practice
  9. program for the HP48SX which I wrote and placed on the HP
  10. BBS... So, here is the documentation with the program
  11. immediately following.  Good Luck!
  12.  
  13. Steve 
  14.  
  15.  
  16.  
  17.  
  18. CW: A Morse Code Practice Program for the HP-48SX
  19.  
  20.  
  21. CW is a directory containing several programs and variables which
  22. comprise a capable Morse code practice system for the user.  The
  23. program can send code using the beeper at speeds slightly over 20
  24. words per minute continuously, without encountering delays due to
  25. calculator "garbage collection".  The user can set the overall
  26. speed and element speed independently, or can manually set the
  27. timing and delay for each element type.  The program will create,
  28. send, and display five character random code groups, or the user
  29. can store any size string in a variable to be sent and displayed
  30. manually.  The following descriptions explain the programs and
  31. variables and their use.
  32.  
  33. CGR (Code GRoups) is a program which creates a string of 25 five
  34. character random groups, sends them using the present speed
  35. parameters, and then displays them so the user can check his
  36. copy.  The characters are selected from a string in CGR
  37. which contains all the characters and prosigns used in amateur
  38. radio license tests.  If the user wishes to practice only certain
  39. characters, this string can be changed with 'CGR' RCL EDIT or 'CGR'
  40. VISIT and the groups will then include only the characters from
  41. the modified string.
  42.  
  43. SPD (SPeeD) is a program which calculates and sets the various
  44. parameters affecting the timing of each type of element.  The
  45. program prompts the user for the overall speed in words per
  46. minute and the element speed, also in words per minute.  After
  47. entering these two numbers on the stack, the user presses [LSHFT]
  48. CONT and the program stores values in ST, LT, ET, CT, and WT.
  49. SPD will not signal an error if speeds are set too high or if
  50. element speed is less than overall speed, but one of the values
  51. in ST, LT, etc. will be set to zero or negative and CWO will halt
  52. or hang.  Calculator speed and overhead as well as time to do
  53. the garbage collect operation limit the speed to slightly more
  54. than 20 wpm if overall and element speeds are the same.  If
  55. the element speed is set faster than the overall speed, somewhat
  56. higher speeds can be reached, 26 wpm overall with 29 wpm element
  57. speed being about the maximum in any case.  The speed will be
  58. quite accurate, within 1% or so in most cases.  The user can
  59. measure the speed if desired by storing the string
  60. "paris paris paris ..." in TXT and using a stopwatch to time from
  61. the first element of a word to the same first element a few words
  62. later.  Divide the number of words timed by the number of seconds
  63. on the stopwatch and then multiply that by 60 to obtain the speed
  64. in words per minute.
  65.  
  66. CWO (CW Output) is the program which actually sends the Morse
  67. code using the beeper.  CWO sends the characters contained in the
  68. string TXT.  TXT is set and CWO is called automatically by the
  69. CGR program, but the user can set TXT and then execute CWO
  70. manually to practice something other than random code groups.
  71.  
  72. DSP (DiSPlay) is a program which displays a screenful of
  73. characters from the TXT string.  CGR calls this program to
  74. display the code groups it creates and sends.  If TXT is more
  75. than one screen long, DSP halts after each successive screen.
  76. The user can view the next screen by pressing [LSHFT] CONT.
  77.  
  78. TXT (TeXT) is a variable which contains a string which will
  79. be sent as Morse code by the CWO program.  Any ACSII character
  80. with decimal code 32 through 128 can be contained in TXT.
  81. Characters that have no representation in Morse code will be
  82. sent as a space.  Note that some of the radio prosigns which
  83. have no representation in ASCII have been placed on some of
  84. those characters.  For a listing of these, see the CODE
  85. variable.  Note that lower case characters are folded into
  86. upper case.
  87.  
  88. CODE (CODE) is a variable which contains a list of short
  89. programs, one for each character.  CWO disassembles this list
  90. on the stack before sending so that it can access the
  91. character codes much more quickly than by other methods.
  92. Prosigns which have no associated ASCII character are rather
  93. arbitrarily placed on the following characters:
  94.      understood (SN)           !
  95.      error (HH)                #
  96.      paragraph (AL)            *
  97.      starting signal (KA)      [
  98.      wait (AS)                 \
  99.      end of work (SK)          ]
  100.  
  101. ST (Short Time) is a numeric variable containing the basic
  102. element (dit) time in seconds, normally set at 1.2/WPM.
  103.  
  104. LT (Long Time) is a numeric variable containing the longer
  105. element (dah) time, set at 3*ST.
  106.  
  107. ET (interElement Time) is a numeric variable containing the
  108. delay time between elements.  This is generally set at the
  109. same value as ST, less the calculator overhead time between
  110. elements, .04 sec.
  111.  
  112. CT (Character Time) is a numeric variable containing the
  113. delay time between characters.  This is usually set to the
  114. same value as LT, adjusted for various calculator overhead
  115. times in the program.
  116.  
  117. WT (Word Time) is a numeric variable containing the delay
  118. time between words.  This is normally set to 7*ST, adjusted
  119. for various calculator overhead delays.
  120.  
  121. FR (FRequency) is the frequency in hertz of the beeper.
  122. Set at 500 hertz, but the user may store any value which
  123. suits individual taste.
  124.  
  125. S (Short beep) is a program which actually sends a single
  126. dit element.  The user will not use this program.
  127.  
  128. L (Long beep) is a program which actually sends a single
  129. dah element.  The user will not use this program.
  130.  
  131. W (Word wait) is a program which generates the delay for
  132. a space character.  The user will not use this program.
  133.  
  134.  
  135.  
  136.  
  137. %%HP: T(3)A(D)F(.);
  138. DIR
  139.   CGR
  140.     \<< "" 1 25
  141.       START 1 5
  142.         START
  143. "+,./0123456789=?ABCDEFGHIJKLMNOPQRSTUVWXYZ]"
  144. RAND OVER SIZE * IP
  145. 1 + DUP SUB +
  146.         NEXT " " +
  147.       NEXT 'TXT'
  148. STO CWO DSP
  149.     \>>
  150.   SPD
  151.     \<<
  152. "Enter overall wpm and
  153. element wpm, then CONT"
  154. PROMPT 1.2 SWAP /
  155. 'ST' STO ST 3 *
  156. 'LT' STO ST .04 -
  157. 'ET' STO 60 SWAP /
  158. 31 ST * - 19 ET * +
  159. 19 / 'WT' STO WT 3
  160. * ET 4 * - .04 -
  161. .117 - 'CT' STO
  162.     \>>
  163.   CWO
  164.     \<< CLEAR CODE
  165. OBJ\-> TXT 1 OVER
  166. SIZE
  167.       FOR I MEM
  168. DROP DUP I DUP SUB
  169. NUM 29 - PICK EVAL
  170. CT WAIT
  171.       NEXT CLEAR
  172.     \>>
  173.   DSP
  174.     \<< 0 TXT SIZE
  175. 154 /
  176.       FOR S
  177.         IF S
  178.         THEN HALT
  179.         END S 154 *
  180. 1 + 1 7
  181.         FOR N 22 +
  182. TXT OVER DUP 22 -
  183. SWAP 1 - SUB N DISP
  184.         NEXT 3
  185. FREEZE DROP
  186.       NEXT
  187.     \>>
  188.   TXT
  189. "PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS PARIS "
  190.   CODE {
  191.     \<< W
  192.     \>>
  193.     \<< W
  194.     \>>
  195.     \<< W
  196.     \>>
  197.     \<< W
  198.     \>>
  199.     \<< W
  200.     \>>
  201.     \<< L L S S
  202.     \>>
  203.     \<< L S L L
  204.     \>>
  205.     \<< L S S L
  206.     \>>
  207.     \<< S L L
  208.     \>>
  209.     \<< S S S L
  210.     \>>
  211.     \<< S S L
  212.     \>>
  213.     \<< L
  214.     \>>
  215.     \<< S S S
  216.     \>>
  217.     \<< S L S
  218.     \>>
  219.     \<< L L S L
  220.     \>>
  221.     \<< S L L S
  222.     \>>
  223.     \<< L L L
  224.     \>>
  225.     \<< L S
  226.     \>>
  227.     \<< L L
  228.     \>>
  229.     \<< S L S S
  230.     \>>
  231.     \<< L S L
  232.     \>>
  233.     \<< S L L L
  234.     \>>
  235.     \<< S S
  236.     \>>
  237.     \<< S S S S
  238.     \>>
  239.     \<< L L S
  240.     \>>
  241.     \<< S S L S
  242.     \>>
  243.     \<< S
  244.     \>>
  245.     \<< L S S
  246.     \>>
  247.     \<< L S L S
  248.     \>>
  249.     \<< L S S S
  250.     \>>
  251.     \<< S L
  252.     \>>
  253.     \<< W
  254.     \>>
  255.     \<< S S L L S L
  256.     \>>
  257.     \<< W
  258.     \>>
  259.     \<< S S S L S L
  260.     \>>
  261.     \<< S L S S S
  262.     \>>
  263.     \<< L S L S L
  264.     \>>
  265.     \<< L L S S
  266.     \>>
  267.     \<< L S L L
  268.     \>>
  269.     \<< L S S L
  270.     \>>
  271.     \<< S L L
  272.     \>>
  273.     \<< S S S L
  274.     \>>
  275.     \<< S S L
  276.     \>>
  277.     \<< L
  278.     \>>
  279.     \<< S S S
  280.     \>>
  281.     \<< S L S
  282.     \>>
  283.     \<< L L S L
  284.     \>>
  285.     \<< S L L S
  286.     \>>
  287.     \<< L L L
  288.     \>>
  289.     \<< L S
  290.     \>>
  291.     \<< L L
  292.     \>>
  293.     \<< S L S S
  294.     \>>
  295.     \<< L S L
  296.     \>>
  297.     \<< S L L L
  298.     \>>
  299.     \<< S S
  300.     \>>
  301.     \<< S S S S
  302.     \>>
  303.     \<< L L S
  304.     \>>
  305.     \<< S S L S
  306.     \>>
  307.     \<< S
  308.     \>>
  309.     \<< L S S
  310.     \>>
  311.     \<< L S L S
  312.     \>>
  313.     \<< L S S S
  314.     \>>
  315.     \<< S L
  316.     \>>
  317.     \<< W
  318.     \>>
  319.     \<< S S L L S S
  320.     \>>
  321.     \<< W
  322.     \>>
  323.     \<< L S S S L
  324.     \>>
  325.     \<< W
  326.     \>>
  327.     \<< L S L S L S
  328.     \>>
  329.     \<< L L L S S S
  330.     \>>
  331.     \<< L L L L S
  332.     \>>
  333.     \<< L L L S S
  334.     \>>
  335.     \<< L L S S S
  336.     \>>
  337.     \<< L S S S S
  338.     \>>
  339.     \<< S S S S S
  340.     \>>
  341.     \<< S S S S L
  342.     \>>
  343.     \<< S S S L L
  344.     \>>
  345.     \<< S S L L L
  346.     \>>
  347.     \<< S L L L L
  348.     \>>
  349.     \<< L L L L L
  350.     \>>
  351.     \<< L S S L S
  352.     \>>
  353.     \<< S L S L S L
  354.     \>>
  355.     \<< L S S S S L
  356.     \>>
  357.     \<< L L S S L L
  358.     \>>
  359.     \<< S L S L S
  360.     \>>
  361.     \<< S L S L S S
  362.     \>>
  363.     \<< L S L L S L
  364.     \>>
  365.     \<< L S L L S
  366.     \>>
  367.     \<< S L L L L S
  368.     \>>
  369.     \<< W
  370.     \>>
  371.     \<< W
  372.     \>>
  373.     \<< S S S L S S L
  374.     \>>
  375.     \<< S S S S S S S
  376. S
  377.     \>>
  378.     \<< S L S S L S
  379.     \>>
  380.     \<< S S S L S
  381.     \>>
  382.     \<< W
  383.     \>> }
  384.   ST .08
  385.   LT .24
  386.   ET .04
  387.   CT .043
  388.   WT .12
  389.   FR 500
  390.   S
  391.     \<< FR ST BEEP ET
  392. WAIT
  393.     \>>
  394.   L
  395.     \<< FR LT BEEP ET
  396. WAIT
  397.     \>>
  398.   W
  399.     \<< FR 0 BEEP WT
  400. WAIT
  401.     \>>
  402. END
  403.  
  404.